// ----------------------------------------------------------------------------
/**
 * @file    addBuddy.h
 *
 * @brief   Header file for addBuddy.cpp
 *
 * The addBuddy class is a dialog that allows users to add valid friends to their friendslist.
 *
 * @author  Siddharth Sathyam <ssathy2@gmail.com>
 * @author  Alan Ruvalcaba <aruval3@gmail.com>
 * @author  Patrick LaMontagna <plamontagna@gmail.com
 *
 * @version 1.0
 *
 * @date    November 24th, 2011
 *
 */
// ----------------------------------------------------------------------------

#ifndef ADDBUDDY_H
#define ADDBUDDY_H

#include <QDialog>
#include <QMessageBox>

namespace Ui {
    class addBuddy;
}

/**
 * @class   addBuddy
 *
 * @brief   The addBuddy helper methods
 *
 */

class addBuddy : public QDialog
{
    Q_OBJECT

signals:

        /**
        * @brief addFriend signal that adds the user to the friends list
        */

	void addFriend(QString);

private slots:

        /**
        * @brief Slot that will handle the friend request confirmation or deny
        *
        * @param personSentTo The user who is receiving the friend request
        * @param isConfirmed A boolean value of the confirm or deny response
        */

	void handleIsValidFriendRequestConfirmation(QString personSentTo, bool isConfirmed);

        /**
        * @brief Slot that determines if the user has clicked the add button
        */

	void on_addButton_clicked();

        /**
        * @brief Slot that determines if the user has clicked the cancel button
        */

	void on_cancelButton_clicked();

    public:
        /// addBuddy Constructor
	addBuddy(QWidget *parent, QString personSendingRequest);
        /// addBuddy Deconstructor
	~addBuddy();
private:
        /**
        * @brief Method that displays the message sent
        * @param msgToDisplay The message to display to the user
        */

	void displayMessage(QString msgToDisplay);
	Ui::addBuddy *ui;

	QString personSendingRequest;
};

#endif // ADDBUDDY_H
